﻿@namespace SE.PO.CInterface.Web.Pages.DB.Components
@using SE.PO.CInterface.Web.Clients
@using SE.PO.CInterface.DBProtocols.Devices
@using SE.PO.CInterface.Po.Equips
@using SE.PO.CInterface.Po.Variables
@using SE.PO.CInterface.Web.Clients.Po
@inject VariableClient Client
@inject INotificationService Notice


<div style="margin-bottom: 16px;">
    点位名:
    <Input Placeholder="点位名" style="width: 369px;" @bind-Value="TagName"/>
    <Button Type="@ButtonType.Primary" OnClick="async () => { await Search(); }">
        搜索
    </Button>
    <Button OnClick="async () => { await Reset(); }" Style="margin-left: 5px;">
        清空
    </Button>
</div>


<Table @ref="_table"
       TItem="VariableDto"
       DataSource="@_source"
       Loading="@_loadingData"
       Total="_total"
       ScrollBarWidth="5px"
       ScrollY="520px"
       @bind-PageIndex="_pageIndex"
       @bind-PageSize="_pageSize"
       @bind-SelectedRows="SelectedVariablesDto"
       Size="TableSize.Small">
    <Selection Key="@(context.Tag)"/>
    <PropertyColumn Width="100" Title="顺序编号" Property="c => c.Order"/>
    <PropertyColumn Width="300" Title="名称" Property="c => c.Tag"/>
    <PropertyColumn Width="300" Title="信号编码" Property="c => c.SignalId"/>
</Table>